Event Standard
The first step in our integration is to send a request to menta to create an event on their platform. This includes all the relevant information about the event you wish to manage. Make sure that the data is complete and accurate to ensure that the event is created correctly.
What Information Does menta Need to Function?
Required Information
To know what information menta needs to create an event, refer to the Events section in our Data section. There you will find the specific requirements and the expected format for the event data.
Remember to replace "YOUR_API_KEY" with your Private API key.
Request Examples
Select your preferred programming language to see an example of how to send a request to create an event.
- cURL
- Python
- Java
- PHP
curl -X POST "https://api.mentatickets.com/v1/events"
-H "Authorization: YOUR_API_KEY"
--data-raw "{
'title': 'The Lion King',
'description': 'More than 60 million people from around the world have come to experience the excitement and discover the splendor of The Lion King's unique musical.',
'externalReferenceId': 'the-lion-king-broadway',
'shows': [
{
'title': 'The Lion King in Broadway theatre',
'primarySalesUrl': 'https://yourplatform.com/event/the-lion-king-broadway/show/4726',
'status': 'LIVE',
'images': [{
'url': 'https://storage.googleapis.com/default_mentatickets-core/dd127bc9-1079-4bbc-9bab-c87acd27edb2_SOURCE.webp',
'kind': 'main'
}],
'showId': '4726',
'date': '2022-04-02T14:00:00.000-04:00',
'ticketOptions': [
{
'title': 'Standard Seat',
'ticketId': '0001',
'description': 'Good view and good audio. At a distance of 40 to 60 meters from the stage.',
'price': 5500,
'currency': 'ARS'
},
{
'title': 'Premium Seat',
'ticketId': '0002',
'description': 'Located at the front of the theater, with an excellent view and premium audio.',
'price': 13800,
'currency': 'ARS'
}
]
}
],
'location': {
'city': 'New York City',
'state': 'New York',
'venueName': 'Broadway theatre',
'address': '200 W 45th Street',
'country': 'United States'
},
'producers': [
{
'name': 'New York Events Producer',
'emails': ['nyproductions@gmail.com'],
'producerId': '819'
}
]
}"
import requests
import json
url = "https://api.mentatickets.com/v1/events"
api_key = "YOUR_API_KEY"
headers = {"Authorization": api_key}
data = {
'title': 'The Lion King',
'description': 'More than 60 million people from around the world have come to experience the excitement and discover the splendor of The Lion King's unique musical.',
'externalReferenceId': 'the-lion-king-broadway',
'shows': [
{
'title': 'The Lion King in Broadway theatre',
'primarySalesUrl': 'https://yourplatform.com/event/the-lion-king-broadway/show/4726',
'status': 'LIVE',
'images': [{
'url': 'https://storage.googleapis.com/default_mentatickets-core/dd127bc9-1079-4bbc-9bab-c87acd27edb2_SOURCE.webp',
'kind': 'main'
}],
'showId': '4726',
'date': '2022-04-02T14:00:00.000-04:00',
'ticketOptions': [
{
'title': 'Standard Seat',
'ticketId': '0001',
'description': 'Good view and good audio. At a distance of 40 to 60 meters from the stage.',
'price': 5500,
'currency': 'ARS'
},
{
'title': 'Premium Seat',
'ticketId': '0002',
'description': 'Located at the front of the theater, with an excellent view and premium audio.',
'price': 13800,
'currency': 'ARS'
}
]
}
],
'location': {
'city': 'New York City',
'state': 'New York',
'venueName': 'Broadway theatre',
'address': '200 W 45th Street',
'country': 'United States'
},
'producers': [
{
'name': 'New York Events Producer',
'emails': ['nyproductions@gmail.com'],
'producerId': '819'
}
]
}
response = requests.post(url, headers=headers, json=data)
import okhttp3.*;
import java.io.IOException;
OkHttpClient client = new OkHttpClient();
MediaType JSON = MediaType.parse("application/json; charset=utf-8");
String json = "{
'title': 'The Lion King',
'description': 'More than 60 million people from around the world have come to experience the excitement and discover the splendor of The Lion King's unique musical.',
'externalReferenceId': 'the-lion-king-broadway',
'shows': [
{
'title': 'The Lion King in Broadway theatre',
'primarySalesUrl': 'https://yourplatform.com/event/the-lion-king-broadway/show/4726',
'status': 'LIVE',
'images': [{
'url': 'https://storage.googleapis.com/default_mentatickets-core/dd127bc9-1079-4bbc-9bab-c87acd27edb2_SOURCE.webp',
'kind': 'main'
}],
'showId': '4726',
'date': '2022-04-02T14:00:00.000-04:00',
'ticketOptions': [
{
'title': 'Standard Seat',
'ticketId': '0001',
'description': 'Good view and good audio. At a distance of 40 to 60 meters from the stage.',
'price': 5500,
'currency': 'ARS'
},
{
'title': 'Premium Seat',
'ticketId': '0002',
'description': 'Located at the front of the theater, with an excellent view and premium audio.',
'price': 13800,
'currency': 'ARS'
}
]
}
],
'location': {
'city': 'New York City',
'state': 'New York',
'venueName': 'Broadway theatre',
'address': '200 W 45th Street',
'country': 'United States'
},
'producers': [
{
'name': 'New York Events Producer',
'emails': ['nyproductions@gmail.com'],
'producerId': '819'
}
]
}";
RequestBody requestBody = RequestBody.create(JSON, json);
Request request = new Request.Builder()
.url("https://api.mentatickets.com/v1/events")
.addHeader("Authorization", "YOUR_API_KEY")
.post(requestBody)
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
} catch (IOException e) {
e.printStackTrace();
}
<?php
$url = "https://api.mentatickets.com/v1/events";
$api_key = "YOUR_API_KEY";
$headers = array("Authorization: {$api_key}");
$data = array(
'title' => 'The Lion King',
'description' => 'More than 60 million people from around the world have come to experience the excitement and discover the splendor of The Lion King's unique musical.',
'externalReferenceId' => 'the-lion-king-broadway',
'shows' => array(
array(
'title' => 'The Lion King in Broadway theatre',
'primarySalesUrl' => 'https://yourplatform.com/event/the-lion-king-broadway/show/4726',
'status' => 'LIVE',
'images' => array(
array(
'url' => 'https://storage.googleapis.com/default_mentatickets-core/dd127bc9-1079-4bbc-9bab-c87acd27edb2_SOURCE.webp',
'kind' => 'main'
)
),
'showId' => '4726',
'date' => '2022-04-02T14:00:00.000-04:00',
'ticketOptions' => array(
array(
'title' => 'Standard Seat',
'ticketId' => '0001',
'description' => 'Good view and good audio. At a distance of 40 to 60 meters from the stage.',
'price' => 5500,
'currency' => 'ARS'
),
array(
'title' => 'Premium Seat',
'ticketId' => '0002',
'description' => 'Located at the front of the theater, with an excellent view and premium audio.',
'price' => 13800,
'currency' => 'ARS'
)
)
)
),
'location' => array(
'city' => 'New York City',
'state' => 'New York',
'venueName' => 'Broadway theatre',
'address' => '200 W 45th Street',
'country' => 'United States'
),
'producers' => array(
array(
'name' => 'New York Events Producer',
'emails' => array('nyproductions@gmail.com'),
'producerId' => '819'
)
)
);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
?>
Additional Considerations
Authentication and Authorization: Ensure that your API key is valid and has the necessary permissions to create events. If you encounter authentication errors, check your key and the associated permissions.
Date and Time Format: The event date and time must be in the correct format and in the appropriate time zone. Refer to menta's documentation for the exact format and time zone requirements.
Error Handling: Properly handle errors that may arise when making the request, such as network errors, data validation errors, or API issues. Implement logic to capture and manage these errors in your application.
Data Validation: Ensure that all data provided in the request is valid and meets menta's requirements. This includes validations for mandatory fields and specific formats.
Event Updates: If you need to update an event after creating it, refer to menta's documentation for details on how to make updates and which fields can be modified.
Response Review: Review the API response to confirm that the event has been created successfully. The response will generally include an event ID or a success message that you can use to verify the creation.
That's it! Just provide us with this information and we will be able to continue to the next step.